<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>learn selenium</title>
    <script type="text/javascript">
        function disp_prompt(){
            var name = prompt("请输入名称")
            if(name != null && name != ""){
                document.write("你好！"+name)
            }
        }
    </script>
</head>
<body>
    <input type="button" onclick="disp_prompt()" value="点击显示prompt对话框" name="prompt" />
</body>
</html>